package com.service.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.service.dao.po.MemberStorePO;
import com.service.dao.model.MemberStore;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface MemberStoreMapper extends BaseMapper<MemberStore> {

    int insertBatch(@Param("recordList") List<MemberStore> recordList);

    /**
     * 获取会员的货币余额
     *
     * @param memberId
     * @param coinStatus
     * @return
     */
    List<MemberStore> selectByMemberId(@Param("memberId") Integer memberId, @Param("coinStatus") Integer coinStatus);

    MemberStorePO selectByMemberIdAndCoinId(@Param("memberId") Integer memberId, @Param("coinId") Integer coinId, @Param("coinStatus") Integer coinStatus);

    MemberStore selectByMemberIdAndCoinId4Admin(@Param("memberId") Integer memberId, @Param("coinId") Integer coinId);


    /**
     * 分组查询用户的资产情况
     *
     * @param filters
     * @return
     */
    List<Object> selectByCoinAndFilterUser(@Param("filters") String filters);

    BigDecimal totalStatementByParam(@Param("coinsName") String coinsName);
}